#include "begin.h"
#include<QPushButton>
#include <Qpainter>

begin::begin(QWidget *parent) : QWidget(parent),t(new Tetris)
{
    QPushButton *b=new QPushButton;
    b->setParent(this);
    b->move(150,280);
    b->setText("BEGIN!");
    QFont ft;
    ft.setPointSize(48);
    b->setFont(ft);
    this->setGeometry(QRect(10,30,550,1000));
    connect(b,&QPushButton::clicked,[=](){
         //t=new Tetris;
        t.show();
        this->hide();
    });
}


void begin::paintEvent(QPaintEvent *event){
    QPainter painter(this);
    painter.setPen(Qt::black);
    painter.setBrush(Qt::black);
    painter.drawRect(0,30,550,1000);
    painter.drawPixmap(0,30,550,1000,QPixmap("://img/6.jpg"));

}
